package main

import "fmt"

func getCounter() func() {
	var count = 0
	var counter = func() {
		count++
		fmt.Println(count)
	}
	return counter
}

func main() {
	var counter = getCounter()
	counter()
	counter()
	counter()
}
